<template>
  <div class="alarm-info">
    <div class="row">
      <div class="row">
        <span class="row-title">报警类型：</span>
        <span>{{ params.alarmTypeName || '--' }}</span>
      </div>
      <div class="row">
        <span class="row-title">最大值：</span>
        <span>{{ params.maxValue + params.unitCode || '--' }}</span>
      </div>
      <div class="row">
        <span class="row-title">处置情况：</span>
        <span>{{ params.disposalLevelName || '--' }}</span>
      </div>
      <div class="row">
        <span class="row-title">开始时间：</span>
        <span>{{ params.beginDate || '--' }}</span>
      </div>
      <div class="row">
        <span class="row-title">结束时间：</span>
        <span>{{ params.endDate || '--' }}</span>
      </div>
      <span class="row-title">报警内容：</span>
      <span>
        {{ params.cdLocation }}
        {{ params.sensorName }}
        {{ params.alarmTypeName }}
        <span v-if="params.alarmType != '004' && params.maxValue">
          最大值：{{ params.maxValue }}{{ params.unitCode }}
        </span>
        <span v-if="params.alarmType != '004' && params.maxTime">最大值时刻：{{ params.maxTime }}</span>
      </span>
    </div>
    <div class="row">
      <span class="row-title">报警原因：</span>
      <span>{{ params.alarmReason || '--' }}</span>
    </div>
    <div class="row">
      <span class="row-title">处置措施：</span>
      <span>{{ params.alarmResult || '--' }}</span>
    </div>
    <div class="row">
      <span class="row-title">持续时长：</span>
      <span>{{ params.keepTimeStr || '--' }}</span>
    </div>
    <div class="row flex">
      <span class="row-title">监测数据：</span>
      <div>
        <div>
          量&emsp;&emsp;程：下限{{ params.quantumLowerLimit || ' -- ' }}，上限{{
          params.quantumHigherLimit || ' -- '
          }}；
        </div>
        <div>
          报警门限：下限{{ params.alertLowerLimit || ' -- ' }}，上限{{
          params.alertHigherLimit || ' -- '
          }}；
        </div>
        <div>
          解报门限：下限{{ params.alertLowerClose || ' -- ' }}，上限{{
          params.alertHigherClose || ' -- '
          }}；
        </div>
        <div>
          断电门限：下限{{ params.pdownValueLower || ' -- ' }}，上限{{
          params.pdownValueHigher || ' -- '
          }}；
        </div>
        <div>
          复电门限：下限{{ params.pupValueLower || ' -- ' }}，上限{{
          params.pupValueHigher || ' -- '
          }}；
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
defineProps<{
  params: Object
}>()
</script>
<style scoped lang="scss">
.alarm-info {
  position: relative;
  background-color: var(--bg-color-page);
  padding: 8px;
  height: 100%;
  color: #cecece;
  .empty-box {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 150px;
  }
  .row {
    margin-bottom: 5px;
    &.flex{
      display: flex;
    }
    .row-title{
      color: #5C7A70
    }
  }
}
</style>
